<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<script>
    function LogoFormatter(val,row){
        return '<a rel="datagrid_group" href="'+val+'" title=""><img alt="" src="'+val+'" width="30px" heigth="30px"></a>';
    }
    function bandImg(){
        $("a[rel=datagrid_group]").fancybox({
            'overlayShow'	: false,
            'transitionIn'	: 'elastic',
            'transitionOut'	: 'elastic'
        });
    }
</script>
<t:datagrid name="adList" title="" actionUrl="adController.do?adGrid&pid=${pid}" idField="adid" onLoadSuccess="bandImg">
    <t:dgCol title="common.code" field="id" hidden="true"></t:dgCol>
    <t:dgCol title="标题" field="name" width="100"></t:dgCol>
    <t:dgCol title="链接地址" field="url" width="100"></t:dgCol>
    <t:dgCol title="图片" field="pic"  extendParams="formatter:LogoFormatter;"></t:dgCol>
    <t:dgCol title="是否可用" field="enable"  width="50"></t:dgCol>
    <t:dgCol title="common.operation" field="opt" width="50"></t:dgCol>
    <t:dgDelOpt url="adController.do?delAdInfo&id={id}" title="common.delete"></t:dgDelOpt>

    <t:dgToolBar title="新增广告信息" langArg="common.language" icon="icon-add" url="adController.do?addorupdate&pid=${pid}" funname="add" width="680" height="400"></t:dgToolBar>
    <t:dgToolBar title="编辑广告信息" langArg="common.language" icon="icon-edit" url="adController.do?addorupdate&pid=${pid}" funname="update" width="680" height="400"></t:dgToolBar>

</t:datagrid>

